<script>
import { getMemberMsgList } from "@/utils/api.js"
export default {
	onLaunch: function() {
		if(uni.getStorageSync('token')) {
			getMemberMsgList({
				token: uni.getStorageSync('token'), number: 1,
				page: 0, type: '', is_read: 1
			}).then(res => {
				if(res.data && res.data.count) {
					uni.setTabBarBadge({
						index: 3,
						text: res.data.count < 100 ? res.data.count + '' : '99+'
					});
				}
			})
		}
	},
	onShow: function() {
	},
	onHide: function() {
		// console.log('App Hide')
	}
}
/**
 * 1.引入插件市场uni-collapse 折叠面板
 * 2.引入插件市场uni-notice-bar 通告栏
 */
</script>

<style>
@import url("utils/style.css");
page {background-color: #f5f5f5;font-size: 26rpx;color: #313131;}
.notBtnSty::after {/*配合一些类名，消除button默认样式，H5、小程序均有效*/
	content: '';width: auto;height: auto;position: static;border: 0;
}
</style>
